/*
 Navicat Premium Data Transfer

 Source Server         : .
 Source Server Type    : SQL Server
 Source Server Version : 16001000
 Source Host           : .:1433
 Source Catalog        : CKS2320
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 16001000
 File Encoding         : 65001

 Date: 08/07/2025 22:02:27
*/


-- ----------------------------
-- Table structure for datastatus
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[datastatus]') AND type IN ('U'))
	DROP TABLE [dbo].[datastatus]
GO

CREATE TABLE [dbo].[datastatus] (
  [Id] uniqueidentifier  NOT NULL,
  [ContentStatus] int  NULL,
  [Content] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [ContentType] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [CreatedTime] datetime  NULL,
  [ModifiedTime] datetime  NULL
)
GO

ALTER TABLE [dbo].[datastatus] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Table structure for detectiondetail
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[detectiondetail]') AND type IN ('U'))
	DROP TABLE [dbo].[detectiondetail]
GO

CREATE TABLE [dbo].[detectiondetail] (
  [Id] uniqueidentifier  NOT NULL,
  [ParentId] uniqueidentifier  NOT NULL,
  [SecondId] bigint  IDENTITY(1,1) NOT NULL,
  [PartCode] nvarchar(40) COLLATE Chinese_PRC_CI_AS  NULL,
  [PLCIP] nvarchar(20) COLLATE Chinese_PRC_CI_AS  NULL,
  [DetectedData] real  NULL,
  [DetectedType] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [DetectedTypeDisplay] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [DetectedIndex] int  NULL,
  [DetectedStatus] int  NULL,
  [DetectedTime] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [Description] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [CreatedTime] datetime  NULL,
  [ModifiedTime] datetime  NULL
)
GO

ALTER TABLE [dbo].[detectiondetail] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Table structure for equipmentfailure
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[equipmentfailure]') AND type IN ('U'))
	DROP TABLE [dbo].[equipmentfailure]
GO

CREATE TABLE [dbo].[equipmentfailure] (
  [Id] uniqueidentifier  NOT NULL,
  [PLCIP] nvarchar(20) COLLATE Chinese_PRC_CI_AS  NULL,
  [Content] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [Language] nvarchar(20) COLLATE Chinese_PRC_CI_AS  NULL,
  [FailureIndex] int  NULL,
  [FailureOffset] real  NULL,
  [CreatedTime] datetime  NULL,
  [ModifiedTime] datetime  NULL
)
GO

ALTER TABLE [dbo].[equipmentfailure] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Table structure for equipmentfailure_copy1
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[equipmentfailure_copy1]') AND type IN ('U'))
	DROP TABLE [dbo].[equipmentfailure_copy1]
GO

CREATE TABLE [dbo].[equipmentfailure_copy1] (
  [Id] uniqueidentifier  NOT NULL,
  [PLCIP] nvarchar(20) COLLATE Chinese_PRC_CI_AS  NULL,
  [Content] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [Language] nvarchar(20) COLLATE Chinese_PRC_CI_AS  NULL,
  [FailureIndex] int  NULL,
  [FailureOffset] real  NULL,
  [CreatedTime] datetime  NULL,
  [ModifiedTime] datetime  NULL
)
GO

ALTER TABLE [dbo].[equipmentfailure_copy1] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Table structure for equipmentfailurehistory
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[equipmentfailurehistory]') AND type IN ('U'))
	DROP TABLE [dbo].[equipmentfailurehistory]
GO

CREATE TABLE [dbo].[equipmentfailurehistory] (
  [Id] uniqueidentifier  NOT NULL,
  [FailureId] uniqueidentifier  NOT NULL,
  [StartTime] datetime  NULL,
  [EndTime] datetime  NULL,
  [TotalTime] nvarchar(20) COLLATE Chinese_PRC_CI_AS  NULL,
  [FaultType] bit  NULL,
  [Content] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [CreatedTime] datetime  NULL,
  [ModifiedTime] datetime  NULL
)
GO

ALTER TABLE [dbo].[equipmentfailurehistory] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Table structure for indicatortolerancezone
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[indicatortolerancezone]') AND type IN ('U'))
	DROP TABLE [dbo].[indicatortolerancezone]
GO

CREATE TABLE [dbo].[indicatortolerancezone] (
  [Id] uniqueidentifier  NOT NULL,
  [PLCIP] nvarchar(20) COLLATE Chinese_PRC_CI_AS  NULL,
  [Indicator] real  NULL,
  [ToleranceZone] real  NULL,
  [Content] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [ContentType] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [CreatedTime] datetime  NULL,
  [ModifiedTime] datetime  NULL
)
GO

ALTER TABLE [dbo].[indicatortolerancezone] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Table structure for keyencedatadetail
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[keyencedatadetail]') AND type IN ('U'))
	DROP TABLE [dbo].[keyencedatadetail]
GO

CREATE TABLE [dbo].[keyencedatadetail] (
  [Id] uniqueidentifier  NOT NULL,
  [ParentId] uniqueidentifier  NOT NULL,
  [PartCode] nvarchar(40) COLLATE Chinese_PRC_CI_AS  NULL,
  [PLCIP] nvarchar(20) COLLATE Chinese_PRC_CI_AS  NULL,
  [DetectedData] real  NULL,
  [DetectedType] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [DetectedIndex] int  NULL,
  [DetectedStatus] int  NULL,
  [DetectedTime] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [Description] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [CreatedTime] datetime  NULL,
  [ModifiedTime] datetime  NULL
)
GO

ALTER TABLE [dbo].[keyencedatadetail] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Table structure for op10coredata
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[op10coredata]') AND type IN ('U'))
	DROP TABLE [dbo].[op10coredata]
GO

CREATE TABLE [dbo].[op10coredata] (
  [Id] bigint  IDENTITY(1,1) NOT NULL,
  [serialNumber] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [testTime] datetime  NULL,
  [judge] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [horizontalCamber] real  NULL,
  [unit] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [passageway] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[op10coredata] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'主键',
'SCHEMA', N'dbo',
'TABLE', N'op10coredata',
'COLUMN', N'Id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'零件二维码',
'SCHEMA', N'dbo',
'TABLE', N'op10coredata',
'COLUMN', N'serialNumber'
GO

EXEC sp_addextendedproperty
'MS_Description', N'测试时间',
'SCHEMA', N'dbo',
'TABLE', N'op10coredata',
'COLUMN', N'testTime'
GO

EXEC sp_addextendedproperty
'MS_Description', N'判定（OK/NG）',
'SCHEMA', N'dbo',
'TABLE', N'op10coredata',
'COLUMN', N'judge'
GO

EXEC sp_addextendedproperty
'MS_Description', N'检测值',
'SCHEMA', N'dbo',
'TABLE', N'op10coredata',
'COLUMN', N'horizontalCamber'
GO

EXEC sp_addextendedproperty
'MS_Description', N'单位',
'SCHEMA', N'dbo',
'TABLE', N'op10coredata',
'COLUMN', N'unit'
GO

EXEC sp_addextendedproperty
'MS_Description', N'通道',
'SCHEMA', N'dbo',
'TABLE', N'op10coredata',
'COLUMN', N'passageway'
GO


-- ----------------------------
-- Table structure for op20coredata
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[op20coredata]') AND type IN ('U'))
	DROP TABLE [dbo].[op20coredata]
GO

CREATE TABLE [dbo].[op20coredata] (
  [Id] bigint  IDENTITY(1,1) NOT NULL,
  [serialNumber] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [testTime] datetime  NULL,
  [voltageAC] real  NULL,
  [voltageACUnit] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [currentAC] real  NULL,
  [currentACUnit] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [resultAC] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [voltageDC] real  NULL,
  [voltageDCUnit] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [currentDC] real  NULL,
  [currentDCUnit] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [resultDC] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [passageway] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [totalLength] real  NULL,
  [totalLengthJudge] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [totalLengthUnit] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [bhverticality] real  NULL,
  [bhverticalityUnit] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [bhverticalityJudge] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [shverticality] real  NULL,
  [shverticalityUnit] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [shverticalityJudge] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [shverticalityTotalJudge] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [finalJudge] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[op20coredata] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'主键',
'SCHEMA', N'dbo',
'TABLE', N'op20coredata',
'COLUMN', N'Id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'二维码',
'SCHEMA', N'dbo',
'TABLE', N'op20coredata',
'COLUMN', N'serialNumber'
GO

EXEC sp_addextendedproperty
'MS_Description', N'时间',
'SCHEMA', N'dbo',
'TABLE', N'op20coredata',
'COLUMN', N'testTime'
GO

EXEC sp_addextendedproperty
'MS_Description', N'AC电压',
'SCHEMA', N'dbo',
'TABLE', N'op20coredata',
'COLUMN', N'voltageAC'
GO

EXEC sp_addextendedproperty
'MS_Description', N'AC电压单位',
'SCHEMA', N'dbo',
'TABLE', N'op20coredata',
'COLUMN', N'voltageACUnit'
GO

EXEC sp_addextendedproperty
'MS_Description', N'AC电流',
'SCHEMA', N'dbo',
'TABLE', N'op20coredata',
'COLUMN', N'currentAC'
GO

EXEC sp_addextendedproperty
'MS_Description', N'AC电流单位',
'SCHEMA', N'dbo',
'TABLE', N'op20coredata',
'COLUMN', N'currentACUnit'
GO

EXEC sp_addextendedproperty
'MS_Description', N'AC判定（OK/NG）',
'SCHEMA', N'dbo',
'TABLE', N'op20coredata',
'COLUMN', N'resultAC'
GO

EXEC sp_addextendedproperty
'MS_Description', N'DC电压',
'SCHEMA', N'dbo',
'TABLE', N'op20coredata',
'COLUMN', N'voltageDC'
GO

EXEC sp_addextendedproperty
'MS_Description', N'DC电压单位',
'SCHEMA', N'dbo',
'TABLE', N'op20coredata',
'COLUMN', N'voltageDCUnit'
GO

EXEC sp_addextendedproperty
'MS_Description', N'DC电流',
'SCHEMA', N'dbo',
'TABLE', N'op20coredata',
'COLUMN', N'currentDC'
GO

EXEC sp_addextendedproperty
'MS_Description', N'DC电流单位',
'SCHEMA', N'dbo',
'TABLE', N'op20coredata',
'COLUMN', N'currentDCUnit'
GO

EXEC sp_addextendedproperty
'MS_Description', N'DC判定（OK/NG）',
'SCHEMA', N'dbo',
'TABLE', N'op20coredata',
'COLUMN', N'resultDC'
GO

EXEC sp_addextendedproperty
'MS_Description', N'通道信息',
'SCHEMA', N'dbo',
'TABLE', N'op20coredata',
'COLUMN', N'passageway'
GO

EXEC sp_addextendedproperty
'MS_Description', N'总长',
'SCHEMA', N'dbo',
'TABLE', N'op20coredata',
'COLUMN', N'totalLength'
GO

EXEC sp_addextendedproperty
'MS_Description', N'total LengthJudge判定',
'SCHEMA', N'dbo',
'TABLE', N'op20coredata',
'COLUMN', N'totalLengthJudge'
GO

EXEC sp_addextendedproperty
'MS_Description', N'totalLengthUnit单位',
'SCHEMA', N'dbo',
'TABLE', N'op20coredata',
'COLUMN', N'totalLengthUnit'
GO


-- ----------------------------
-- Table structure for op30coredata
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[op30coredata]') AND type IN ('U'))
	DROP TABLE [dbo].[op30coredata]
GO

CREATE TABLE [dbo].[op30coredata] (
  [Id] bigint  IDENTITY(1,1) NOT NULL,
  [serialNumber] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [testTime] datetime  NULL,
  [passageway] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [facadeCamber] real  NULL,
  [camberJudge] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [camberUnit] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [backScallop3Pitch] real  NULL,
  [backScallop3Diameter] real  NULL,
  [maxThickness] real  NULL,
  [maxThicknessJudge] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [maxThicknessUnit] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [miniThickness] real  NULL,
  [miniThicknessJudge] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [miniThicknessUnit] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [finalJudge] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [sc01] real  NULL,
  [sc02] real  NULL,
  [sc03] real  NULL,
  [sc04] real  NULL,
  [sedJudge] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [sc01Unit] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [sc01judge] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [sc02Unit] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [sc03Unit] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [sc04Unit] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [sc02judge] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [sc03judge] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [sc04judge] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [scTotalJudge] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [thicknessJudge] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [backScallop2Diameter] real  NULL,
  [backScallop2Pitch] real  NULL,
  [frontScallop2Diameter] real  NULL,
  [frontScallop2Pitch] real  NULL,
  [frontScallop3Diameter] real  NULL,
  [frontScallop3Pitch] real  NULL,
  [NonPositiveMaxThickness] real  NULL,
  [NonPositiveMaxThicknessJudge] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [NonPositiveMaxThicknessUnit] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [NonPositiveMiniThickness] real  NULL,
  [NonPositiveMiniThicknessJudge] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [NonPositiveMiniThicknessUnit] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[op30coredata] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'二维码',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'serialNumber'
GO

EXEC sp_addextendedproperty
'MS_Description', N'时间',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'testTime'
GO

EXEC sp_addextendedproperty
'MS_Description', N'通道信息',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'passageway'
GO

EXEC sp_addextendedproperty
'MS_Description', N'立面拱曲度',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'facadeCamber'
GO

EXEC sp_addextendedproperty
'MS_Description', N'拱曲度结果判定',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'camberJudge'
GO

EXEC sp_addextendedproperty
'MS_Description', N'camberUnit单位',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'camberUnit'
GO

EXEC sp_addextendedproperty
'MS_Description', N'背面波间距',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'backScallop3Pitch'
GO

EXEC sp_addextendedproperty
'MS_Description', N'背面波直径',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'backScallop3Diameter'
GO

EXEC sp_addextendedproperty
'MS_Description', N'膜厚最大值',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'maxThickness'
GO

EXEC sp_addextendedproperty
'MS_Description', N'膜厚最大值判定',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'maxThicknessJudge'
GO

EXEC sp_addextendedproperty
'MS_Description', N'单位',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'maxThicknessUnit'
GO

EXEC sp_addextendedproperty
'MS_Description', N'膜厚最小值',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'miniThickness'
GO

EXEC sp_addextendedproperty
'MS_Description', N'膜厚最小值判定',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'miniThicknessJudge'
GO

EXEC sp_addextendedproperty
'MS_Description', N'最小值单位',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'miniThicknessUnit'
GO

EXEC sp_addextendedproperty
'MS_Description', N'OP30最总判定=camber结果，上膜厚判定=',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'finalJudge'
GO

EXEC sp_addextendedproperty
'MS_Description', N'C基准-64',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'sc01'
GO

EXEC sp_addextendedproperty
'MS_Description', N'C基准-1',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'sc02'
GO

EXEC sp_addextendedproperty
'MS_Description', N'C基准-大端距离',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'sc03'
GO

EXEC sp_addextendedproperty
'MS_Description', N'C基准-小端距离',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'sc04'
GO

EXEC sp_addextendedproperty
'MS_Description', N'小末端方向检查NG和OK',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'sedJudge'
GO

EXEC sp_addextendedproperty
'MS_Description', N'C基准-64单位',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'sc01Unit'
GO

EXEC sp_addextendedproperty
'MS_Description', N'C基准-64波距离结果OKNG',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'sc01judge'
GO

EXEC sp_addextendedproperty
'MS_Description', N'C基准-1单位',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'sc02Unit'
GO

EXEC sp_addextendedproperty
'MS_Description', N'C基准-大端距离单位',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'sc03Unit'
GO

EXEC sp_addextendedproperty
'MS_Description', N'C基准-小端距离单位',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'sc04Unit'
GO

EXEC sp_addextendedproperty
'MS_Description', N'C基准-1波距离结果OKNG',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'sc02judge'
GO

EXEC sp_addextendedproperty
'MS_Description', N'C基准-大端距离结果OKNG',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'sc03judge'
GO

EXEC sp_addextendedproperty
'MS_Description', N'C基准-小端距离结果OKNG',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'sc04judge'
GO

EXEC sp_addextendedproperty
'MS_Description', N'背面波直径',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'backScallop2Diameter'
GO

EXEC sp_addextendedproperty
'MS_Description', N'背面波间距',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'backScallop2Pitch'
GO

EXEC sp_addextendedproperty
'MS_Description', N'正面波直径',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'frontScallop2Diameter'
GO

EXEC sp_addextendedproperty
'MS_Description', N'正面波间距',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'frontScallop2Pitch'
GO

EXEC sp_addextendedproperty
'MS_Description', N'正面波直径',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'frontScallop3Diameter'
GO

EXEC sp_addextendedproperty
'MS_Description', N'正面波间距',
'SCHEMA', N'dbo',
'TABLE', N'op30coredata',
'COLUMN', N'frontScallop3Pitch'
GO


-- ----------------------------
-- Table structure for PerformanceRecord
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[PerformanceRecord]') AND type IN ('U'))
	DROP TABLE [dbo].[PerformanceRecord]
GO

CREATE TABLE [dbo].[PerformanceRecord] (
  [Id] uniqueidentifier  NOT NULL,
  [PlantQuantity] real DEFAULT 0 NULL,
  [PlantRunTime] real DEFAULT 0 NULL,
  [TotalRunTime] real DEFAULT 0 NULL,
  [FaultTime] real DEFAULT 0 NULL,
  [StopTime] real DEFAULT 0 NULL,
  [TotalQuantity] real  NULL,
  [ProductYield] real  NULL,
  [OEE] real  NULL,
  [Remarks] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [CreatedTime] datetime  NULL,
  [ModifiedTime] datetime  NULL
)
GO

ALTER TABLE [dbo].[PerformanceRecord] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Table structure for shape
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[shape]') AND type IN ('U'))
	DROP TABLE [dbo].[shape]
GO

CREATE TABLE [dbo].[shape] (
  [Id] uniqueidentifier  NOT NULL,
  [SecondId] bigint  IDENTITY(1,1) NOT NULL,
  [StationCode] nvarchar(20) COLLATE Chinese_PRC_CI_AS  NULL,
  [Heart1] bit  NULL,
  [StartUpLoad] bit  NULL,
  [PartCode] nvarchar(40) COLLATE Chinese_PRC_CI_AS  NULL,
  [PartCodeTrigger] bit  NULL,
  [Heart2] bit  NULL,
  [EndUpLoad] bit  NULL,
  [Result] bit  NULL,
  [PartCodeResult] int  NULL,
  [RunType] nvarchar(10) COLLATE Chinese_PRC_CI_AS  NULL,
  [Pushed] bit  NULL,
  [CreatedTime] datetime  NULL,
  [ModifiedTime] datetime  NULL
)
GO

ALTER TABLE [dbo].[shape] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Table structure for thicknessdetection
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[thicknessdetection]') AND type IN ('U'))
	DROP TABLE [dbo].[thicknessdetection]
GO

CREATE TABLE [dbo].[thicknessdetection] (
  [Id] uniqueidentifier  NOT NULL,
  [SecondId] bigint  IDENTITY(1,1) NOT NULL,
  [StationCode] nvarchar(20) COLLATE Chinese_PRC_CI_AS  NULL,
  [Heart1] bit  NULL,
  [3DScannerStart] bit  NULL,
  [3DScannerEnd] bit  NULL,
  [StartUpLoad] bit  NULL,
  [PartCode] nvarchar(40) COLLATE Chinese_PRC_CI_AS  NULL,
  [TotalLengthResult] bit  NULL,
  [CRSmallEndDistanceResult] bit  NULL,
  [CRLargeEndDistanceResult] bit  NULL,
  [CRFront1WaveDistanceResult] bit  NULL,
  [CRFront64WaveDistanceResult] bit  NULL,
  [FrontThicknessResult1] bit  NULL,
  [FrontThicknessResult2] bit  NULL,
  [FrontThicknessResult3] bit  NULL,
  [FrontThicknessResult4] bit  NULL,
  [FrontThicknessResult5] bit  NULL,
  [FrontThicknessResult6] bit  NULL,
  [FrontThicknessResult7] bit  NULL,
  [BackThicknessResult1] bit  NULL,
  [BackThicknessResult2] bit  NULL,
  [BackThicknessResult3] bit  NULL,
  [BackThicknessResult4] bit  NULL,
  [BackThicknessResult5] bit  NULL,
  [BackThicknessResult6] bit  NULL,
  [BackThicknessResult7] bit  NULL,
  [SmallEndDirectionInspectionResult] bit  NULL,
  [FacadeCurvatureResult] bit  NULL,
  [Result] bit  NULL,
  [Heart2] bit  NULL,
  [EndUpLoad] bit  NULL,
  [3DScannerResult] bit  NULL,
  [RunType] nvarchar(10) COLLATE Chinese_PRC_CI_AS  NULL,
  [Pushed] bit  NULL,
  [CreatedTime] datetime  NULL,
  [ModifiedTime] datetime  NULL
)
GO

ALTER TABLE [dbo].[thicknessdetection] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Table structure for voltagewithstand
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[voltagewithstand]') AND type IN ('U'))
	DROP TABLE [dbo].[voltagewithstand]
GO

CREATE TABLE [dbo].[voltagewithstand] (
  [Id] uniqueidentifier  NOT NULL,
  [SecondId] bigint  IDENTITY(1,1) NOT NULL,
  [StationCode] nvarchar(20) COLLATE Chinese_PRC_CI_AS  NULL,
  [Heart1] bit  NULL,
  [StartUpLoad] bit  NULL,
  [PartCode] nvarchar(40) COLLATE Chinese_PRC_CI_AS  NULL,
  [VoltageWithstandResult] bit  NULL,
  [VoltageWithstandResultAC] bit  NULL,
  [TotalLengthResult] bit  NULL,
  [CameraDetectionResult] bit  NULL,
  [Heart2] bit  NULL,
  [EndUpLoad] bit  NULL,
  [Result] bit  NULL,
  [RunType] nvarchar(10) COLLATE Chinese_PRC_CI_AS  NULL,
  [Pushed] bit  NULL,
  [CreatedTime] datetime  NULL,
  [ModifiedTime] datetime  NULL,
  [BHVerticalityJudge] bit  NULL,
  [SHVerticalityJudge] bit  NULL
)
GO

ALTER TABLE [dbo].[voltagewithstand] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Primary Key structure for table datastatus
-- ----------------------------
ALTER TABLE [dbo].[datastatus] ADD CONSTRAINT [PK__datastat__3214EC0723AABCB3] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for detectiondetail
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[detectiondetail]', RESEED, 2764699)
GO


-- ----------------------------
-- Indexes structure for table detectiondetail
-- ----------------------------
CREATE NONCLUSTERED INDEX [IDX_CreatedTime]
ON [dbo].[detectiondetail] (
  [CreatedTime] ASC
)
GO


-- ----------------------------
-- Primary Key structure for table detectiondetail
-- ----------------------------
ALTER TABLE [dbo].[detectiondetail] ADD CONSTRAINT [PK__detectio__3214EC0748F1C83B] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Primary Key structure for table equipmentfailure
-- ----------------------------
ALTER TABLE [dbo].[equipmentfailure] ADD CONSTRAINT [PK__equipmen__3214EC07505E8BF5] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Primary Key structure for table equipmentfailure_copy1
-- ----------------------------
ALTER TABLE [dbo].[equipmentfailure_copy1] ADD CONSTRAINT [PK__equipmen__3214EC07E8DC2E5E] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Primary Key structure for table equipmentfailurehistory
-- ----------------------------
ALTER TABLE [dbo].[equipmentfailurehistory] ADD CONSTRAINT [PK__equipmen__3214EC07A60026FD] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Primary Key structure for table indicatortolerancezone
-- ----------------------------
ALTER TABLE [dbo].[indicatortolerancezone] ADD CONSTRAINT [PK__indicato__3214EC07025E3DA8] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Primary Key structure for table keyencedatadetail
-- ----------------------------
ALTER TABLE [dbo].[keyencedatadetail] ADD CONSTRAINT [PK__keyenced__3214EC071A2E9C6B] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for op10coredata
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[op10coredata]', RESEED, 467228)
GO


-- ----------------------------
-- Indexes structure for table op10coredata
-- ----------------------------
CREATE NONCLUSTERED INDEX [IDX_OP10_CreatedTime]
ON [dbo].[op10coredata] (
  [testTime] ASC
)
GO


-- ----------------------------
-- Primary Key structure for table op10coredata
-- ----------------------------
ALTER TABLE [dbo].[op10coredata] ADD CONSTRAINT [PK_OP10CoreData] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for op20coredata
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[op20coredata]', RESEED, 446325)
GO


-- ----------------------------
-- Indexes structure for table op20coredata
-- ----------------------------
CREATE NONCLUSTERED INDEX [IDX_OP20_CreatedTime]
ON [dbo].[op20coredata] (
  [testTime] ASC
)
GO


-- ----------------------------
-- Primary Key structure for table op20coredata
-- ----------------------------
ALTER TABLE [dbo].[op20coredata] ADD CONSTRAINT [PK_OP20CoreData] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for op30coredata
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[op30coredata]', RESEED, 435610)
GO


-- ----------------------------
-- Indexes structure for table op30coredata
-- ----------------------------
CREATE NONCLUSTERED INDEX [IDX_OP30_CreatedTime]
ON [dbo].[op30coredata] (
  [testTime] ASC
)
GO


-- ----------------------------
-- Primary Key structure for table op30coredata
-- ----------------------------
ALTER TABLE [dbo].[op30coredata] ADD CONSTRAINT [PK_OP30CoreData] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Primary Key structure for table PerformanceRecord
-- ----------------------------
ALTER TABLE [dbo].[PerformanceRecord] ADD CONSTRAINT [PK__Performa__3214EC0713636A4C] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for shape
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[shape]', RESEED, 532427)
GO


-- ----------------------------
-- Indexes structure for table shape
-- ----------------------------
CREATE NONCLUSTERED INDEX [IDX_s_CreatedTime]
ON [dbo].[shape] (
  [CreatedTime] ASC
)
GO


-- ----------------------------
-- Primary Key structure for table shape
-- ----------------------------
ALTER TABLE [dbo].[shape] ADD CONSTRAINT [PK__shape__3214EC07E731FC17] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for thicknessdetection
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[thicknessdetection]', RESEED, 500370)
GO


-- ----------------------------
-- Indexes structure for table thicknessdetection
-- ----------------------------
CREATE NONCLUSTERED INDEX [IDX_T_CreatedTime]
ON [dbo].[thicknessdetection] (
  [CreatedTime] ASC
)
GO


-- ----------------------------
-- Primary Key structure for table thicknessdetection
-- ----------------------------
ALTER TABLE [dbo].[thicknessdetection] ADD CONSTRAINT [PK__thicknes__3214EC075A1A54D8] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for voltagewithstand
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[voltagewithstand]', RESEED, 511477)
GO


-- ----------------------------
-- Indexes structure for table voltagewithstand
-- ----------------------------
CREATE NONCLUSTERED INDEX [IDX_V_CreatedTime]
ON [dbo].[voltagewithstand] (
  [CreatedTime] ASC
)
GO


-- ----------------------------
-- Primary Key structure for table voltagewithstand
-- ----------------------------
ALTER TABLE [dbo].[voltagewithstand] ADD CONSTRAINT [PK__voltagew__3214EC07CE5BB9DE] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO

